from typing import List, Tuple, Dict


def paginate(data: List, page_size: int, page_number: int) -> Tuple[List, Dict]:
    """
    对给定的数据进行分页处理。

    :param data: 要分页的数据列表
    :param page_size: 每页的大小
    :param page_number: 当前页码
    :return: 当前页的数据列表和分页信息字典
    """
    # 计算总页数
    total_count = len(data)
    total_pages = (total_count + page_size - 1) // page_size  # 向上取整

    # 检查页码是否有效，如果不是，则修正为有效的页码
    page_number = max(1, min(page_number, total_pages))

    # 计算当前页的起始索引和结束索引
    start_index = (page_number - 1) * page_size
    end_index = min(start_index + page_size, total_count)

    # 获取当前页的数据
    page_data = data[start_index:end_index]

    # 分页信息
    pagination_info = {
        'total_count': total_count,
        'total_pages': total_pages,
        'current_page': page_number,
        'has_next': page_number < total_pages,
        'has_prev': page_number > 1,
    }

    return page_data, pagination_info


# 使用示例
data_list = [f'item_{i}' for i in range(1, 51)]  # 假设有50条数据
page_size = 10  # 每页10条数据
page_number = 3  # 请求第3页

page_data, pagination_info = paginate(data_list, page_size, page_number)
print(f"当前页数据: {page_data}")
print(f"分页信息: {pagination_info}")